﻿	
//通过时间戳获取时间
function getDate(d){
	var date =  new Date(d);
	    var y = 1900+date.getYear();
	    var m = "0"+(date.getMonth()+1);
	    var d = "0"+date.getDate();
	    return y+"-"+m.substring(m.length-2,m.length)+"-"+d.substring(d.length-2,d.length);

	
}

//存值
stringify=function (obj,data){
	
	return window.localStorage.setItem(obj, JSON.stringify(data));
	
}
//取值
parse=function (obj){
	
	return JSON.parse(localStorage.getItem(obj));
}